home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9155 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  989 b 

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Gcc compiling with ma
  5. Date: 8 Mar 1996 12:02:00 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4hp7jo$krp@gail.ripco.com>
  8. NNTP-Posting-Host: golden.ripco.com
  9.  
  10. email@interpro.net.au (Mark)
  11. in <email.14.000ACC40@interpro.net.au> writes:
  12.  
  13.  
  14. >I'm trying to compile a GCC Programme which includes the math.h library. How
  15. >do I compile this? I.e
  16.  
  17. >I have tried           gcc filename.c -lm
  18.  
  19. >with no success.
  20.  
  21. Since this should work, and you haven't told us what happens, it's a
  22. pure guess.  Is it just that you can't find the output? If you want an
  23. output file with a name other than `a.out', use the option
  24. `-o your_output_file_name'.
  25.  
  26. BTW, `math.h' is a header, not a library.  The library is `libm.a'.
  27.                                                                                                     
  28. --
  29. * Martin Ambuhl       net: mambuhl@ripco.com
  30. * Chicago, IL (USA)    
  31.